/*
 * serialLoopBack.c
 *
 * Created: 10/11/2013 10:11:58 PM
 *  Author: Tim
 */ 

#include "../src/Epiphany.h"

void setup()
{
	clockInit();
	usbInit(57600);
	RTC_DelayInit();
	sei();
}

uint8_t byte;

void loop()
{
	if(dataInBufUSB())
	{
		fscanf(&USB_str,"%c",&byte);	//read a character (denoted by %c) from the USB stream, and store it at the address of (address of = &) the variable byte
		fprintf(&USB_str,"%c",byte);	//print a character (denoted by %c) byte
	}
}